﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Dragon.Prototype1.Infrastructure.CodeGenerator
{
    public class DateSNCode:CodeBase
    {
        public DateSNCode():base("SN")
        { 
            
        }

        public override string Format
        {
            get
            {
                return "SN{0:yyyyMMdd}{1:000}";
            }
        }

        public override string CalculateNextCode(int currentNo)
        {
            return string.Format(this.Format,DateTime.Now,currentNo);
        }
    }
}
